/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ldapuser;

import java.io.IOException;
import java.net.*;
/**
 *
 * @author adentranter@gmail.com
 */
public class Server {
   private int port = 3432;
   private  ServerSocket server = null;
   private Boolean listening = true;

    public Server() throws IOException{
           
           try {
                server = new ServerSocket(port);
           }catch (IOException e) {
                System.err.println("Server couldn't bind to port.");
                System.exit(-1);
           }

           while (listening) {
               new ServerThread(server.accept()).start();
           }
    }
}
